<template>
    <div class="grid-content rt">
      <ul>
          <li v-for="item in collect" :key="item.id" @click="handActive(item.id)" :class="numA===item.id?'active':''">{{item.name}}</li>
       </ul>
       <div @click="dialogTableVisible = true">创建</div>
    </div>
    <div class="grid-content rb" >
      <img src="@/assets/images/111.png" alt="">
    </div>


    <el-dialog v-model="dialogTableVisible" title="请打开 中舞网APP 扫码,使用此功能" width="30%" center>
      <img src="@/assets/images/111.png" alt="">
      <div>扫描此二维码，同样可下载</div>
  </el-dialog>
  </template>
  
  <script setup lang='ts'>
    import {ref} from 'vue'
    interface colValue{
        name:string,
        id:number
    }
    type colListValue=colValue[]
    const collect=ref<colListValue>([
        {
            name:'全部',
            id:1001
        },{
            name:'我创建的',
            id:1002
        },{
            name:'我加入的',
            id:1003
        },{
            name:'我课程的',
            id:1004
        }
    ])
    const numA=ref(1001)
    const handActive=(val:number)=>{
        numA.value = val
    }
    const dialogTableVisible = ref(false)
  </script>
  
  <style scoped lang="less">
    .grid-content {
    border-radius: 10px;
    background-color:white ;
    margin: 20px 5px;
    padding-left:1px;
  }
  .rb{
    min-height:500px;
    display: flex;
    justify-content: center;
    align-items: center;
   
  }
  .rt{
    min-height: 60px;
    line-height: 60px;
    padding:10px 20px 10px;
    display: flex;
    justify-content: space-between;
    div{
      width:80px;
      height: 30px;
      line-height: 30px;
      text-align: center;
      background-color: #f93684;
      border-radius: 16px ;
      color: white;
      margin-top: 10px;
      cursor: pointer;
    }
    li{
        display: inline-block;
        margin-right: 25px;
        height: 20px;
        line-height: 20px;
        cursor: pointer;
        padding: 15px;
    }
    .active{
            background-color:  #f93684;
            border-radius: 5px;
    }
  }
  .el-dialog{
    font-size: 12px;
  }
  </style>